package com.atguigu.util;

public class Tuple3<T0, T1, T2> {
    public T0 f0;
    public T1 f1;
    public T2 f2;

    public Tuple3() {
    }

    public Tuple3(T0 f0, T1 f1, T2 f2) {
        this.f0 = f0;
        this.f1 = f1;
        this.f2 = f2;
    }

    public static <T0, T1, T2> Tuple3<T0, T1, T2> of(T0 f0, T1 f1, T2 f2) {
        return new Tuple3<>(f0, f1, f2);
    }

    @Override
    public String toString() {
        return "Tuple3{" +
                "f0=" + f0 +
                ", f1=" + f1 +
                ", f2=" + f2 +
                '}';
    }

    public static void main(String[] args) {
        var t3 = new Tuple3<String, String, String>("a", "b", "c");
        var tt3 = Tuple3.of("a", "b", "c");

        System.out.println(tt3);
    }
}
